﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using HZ.MBSM.Model;
using HZ.MBSM.DBUtility;

public partial class Bidder_ComNoPass : System.Web.UI.Page
{
    
    protected void Page_Load(object sender, EventArgs e)
    {
        System.Collections.Generic.List<HZ.MBSM.DAL.AccountType> _AccountType = new System.Collections.Generic.List<HZ.MBSM.DAL.AccountType>();
        _AccountType.Add(HZ.MBSM.DAL.AccountType.enumAdmin);
        _AccountType.Add(HZ.MBSM.DAL.AccountType.enumAttorney);
        _AccountType.Add(HZ.MBSM.DAL.AccountType.enumCompany);
        if (HZ.MBSM.BLL.Login.CheckAssert(_AccountType))
        {
            if (!IsPostBack)
            {
                string sql;
                Int64 Account_TBR;
               
                HZ.MBSM.Model.Account _Account = (HZ.MBSM.Model.Account)Session["Account"];
                if (_Account != null)
                {
                    Account_TBR = SysFun.ToInt(_Account.AccountId);
                    Db db = new Db();
                    System.Data.IDataReader dr;
                    sql = "select memo6 from company where accountid=" + Account_TBR +" and (checkstatus=2 or isnull(checkstatus,0)=0)";
                    dr = db.DataReader(sql);
                    while (dr.Read())
                    {
                        if (Convert.IsDBNull(dr["memo6"]))
                        {
                            NoPass.Text = "该企业还未审核！";
                        }
                        else
                        {
                          NoPass.Text = "审核未通过原因：\n"+dr["memo6"].ToString();
                        }
                        
                       
                    }
                    dr.Dispose();
                    dr.Close();
                    db.Close();

                }
            }
        }
    }
}
